package com.uzai.console.mapper;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.profit.ladderratio.LadderRatioInfoDto;
import com.uzai.console.dto.profit.nuserrewardrule.NuserRewardRuleInfoDto;
import com.uzai.console.dto.profit.nuserrewardrule.NuserRewardRuleQuery;
import com.uzai.console.entity.LadderRatio;
import com.uzai.console.entity.NuserRewardRule;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Repository
public interface NuserRewardRuleMapper {
    int deleteById(@Param("id") Long id, @Param("merId") Long merId);

    int insert(NuserRewardRule record);

    int insertSelective(NuserRewardRule record);

    NuserRewardRule selectById(@Param("id") Long id, @Param("merId") Long merId);

    //验证订单数是否交叉
    NuserRewardRule selectByOrderCount(NuserRewardRuleInfoDto record);

    //验证全平台订单数是否交叉
    NuserRewardRule selectByAllOrderCount(NuserRewardRuleInfoDto record);

    //验证淘宝订单数是否交叉
    NuserRewardRule selectByTbOrderCount(NuserRewardRuleInfoDto record);

    //验证京东订单数是否交叉
    NuserRewardRule selectByJdOrderCount(NuserRewardRuleInfoDto record);

    //验证拼多多订单数是否交叉
    NuserRewardRule selectByPddOrderCount(NuserRewardRuleInfoDto record);

    //验证唯品会订单数是否交叉
    NuserRewardRule selectByVphOrderCount(NuserRewardRuleInfoDto record);

    //验证抖音订单数是否交叉
    NuserRewardRule selectByDyOrderCount(NuserRewardRuleInfoDto record);

    //验证快速订单数是否交叉
    NuserRewardRule selectByKsOrderCount(NuserRewardRuleInfoDto record);

    //验证本地生活订单数是否交叉
    NuserRewardRule selectByLocalliveOrderCount(NuserRewardRuleInfoDto record);

    //验证最后下单事件是否重复
    NuserRewardRule selectByLastOrderDay(NuserRewardRuleInfoDto record);

    //验证最后下单事件是否重复
    NuserRewardRule selectByRegTime(NuserRewardRuleInfoDto record);

    int updateSelective(NuserRewardRule record);

    int update(NuserRewardRule record);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    ArrayList<NuserRewardRule> findByList(Page<NuserRewardRule> page, @Param("query") NuserRewardRuleQuery query);

    /**
     * 查询所有
     * @param query
     * @return
     */
    ArrayList<NuserRewardRule> findByList(@Param("query") NuserRewardRuleQuery query);
}